import { configure } from 'mobx'
import { createContext, useContext } from 'react'

import Interactive from './modules/Interactive'

configure({
  enforceActions: 'never',
})

const store = {
  interactive: Interactive,
}

const StoreContext = createContext<typeof store>(store)

const useStore = () => {
  return useContext(StoreContext)
}

export { store, StoreContext, useStore }
